package com.cdtye.itps.cms.service.line;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cdtye.common.mybatiscore.base.BaseService;
import com.cdtye.itps.cms.dao.line.entity.JcSecline;
import com.cdtye.itps.cms.dao.line.vo.JcSeclineVo;
import com.cdtye.itps.cms.mapper.line.JcSeclineMapper;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Api("线路 服务")
@Service
@Transactional(rollbackFor = Exception.class)
public class JcSeclineService extends BaseService<JcSeclineMapper, JcSecline> {
    /**
     * 获取线路详情
     * @param seclineId
     * @return
     */
    public Map<String,Object> getSeclineById(String seclineId){
        return baseMapper.getSeclineById(seclineId);
    }

    /**
     *线路列表查询
     * @param vo
     * @return
     */
    public List<JcSecline> getSeclineList(JcSeclineVo vo){
        return baseMapper.getSeclineList(vo);
    }

    /**
     * 分页查询
     * @param vo
     * @return
     */
    public IPage<Map<String,Object>> pageList(JcSeclineVo vo){
        return baseMapper.pageList(vo.page(),vo);
    }

    public IPage<Map<String,Object>> pageList4Brain(JcSeclineVo vo){
        return baseMapper.pageList4Brain(vo.page(),vo);
    }
}
